-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make convert_time as State method #2431
base: main
Are you sure you want to change the base?
Conversation
if self.dataloader_len is None: | ||
raise RuntimeError('Cannot convert time, as state.dataloader_len is None.') | ||
return Time( | ||
int(time.value * int(self.dataloader_len) * self.max_duration.value), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mvpatel2000, I am not sure if we should apply ssr
here. I decided to keep the original implementation but I do not see any reason to apply this scaling once the TimeUnit has changed to BATCH. Similarly to the elif
case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... i think we probably shouldn't apply SSR here.
Do you mind if I directly touch your PR? There's a few other places we use a similar function (eg runtime estimator) and I think it could be good to consolidate into this API.
Also, apologies for the delay in review. We're in the middle of a release so we're freezing everything but bug fixes. I'll make sure this gets into the next release (0.16.1) which will come very soon after 0.16 (likely a weekish?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, feel free to edit the PR 😄
Thanks for your efforts. I am happy to keep contributing with PRs or Issues if I find something.
Let me know if I can help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@priba apologies for the delay, this might be on the backburner for a few weeks. Really slammed with other things. If this is a blocker, please let me know and we can try landing a smaller solution. However, I'd really like to get to the full solution and make this much easier for everyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, we already have a workaround. Although it would be a nice feature, I understand it is not a high priority :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mvpatel2000 , are there any news regarding this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I wasn't able to get to it yet. I will make sure to prioritize over next 2-3 weeks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@priba sorry for delay, I still haven't gotten to it. I will make sure to do in January though. I keep getting pre-empted with higher priority items
What does this PR do?
This PR exposes
_convert_time
into the API. As discussed in the related issue, it has been converted into a State method.What issue(s) does this change relate to?
Addresses issue #2426
Before submitting
pre-commit
on your change? (see thepre-commit
section of prerequisites)